package com.ruoyi.adapayRecord.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.adapayRecord.mapper.AdapayRecordMapper;
import com.ruoyi.adapayRecord.domain.AdapayRecord;
import com.ruoyi.adapayRecord.service.IAdapayRecordService;

/**
 * 汇付支付支付记录Service业务层处理
 *
 * @author ruoyi
 * @date 2022-02-22
 */
@Service
public class AdapayRecordServiceImpl implements IAdapayRecordService
{
    @Autowired
    private AdapayRecordMapper adapayRecordMapper;

    /**
     * 查询汇付支付支付记录
     *
     * @param id 汇付支付支付记录主键
     * @return 汇付支付支付记录
     */
    @Override
    public AdapayRecord selectAdapayRecordById(Long id)
    {
        return adapayRecordMapper.selectAdapayRecordById(id);
    }

    /**
     * 查询汇付支付支付记录列表
     *
     * @param adapayRecord 汇付支付支付记录
     * @return 汇付支付支付记录
     */
    @Override
    public List<AdapayRecord> selectAdapayRecordList(AdapayRecord adapayRecord)
    {
        return adapayRecordMapper.selectAdapayRecordList(adapayRecord);
    }

    /**
     * 新增汇付支付支付记录
     *
     * @param adapayRecord 汇付支付支付记录
     * @return 结果
     */
    @Override
    public int insertAdapayRecord(AdapayRecord adapayRecord)
    {
        adapayRecord.setCreateTime(DateUtils.getNowDate());
        return adapayRecordMapper.insertAdapayRecord(adapayRecord);
    }

    /**
     * 修改汇付支付支付记录
     *
     * @param adapayRecord 汇付支付支付记录
     * @return 结果
     */
    @Override
    public int updateAdapayRecord(AdapayRecord adapayRecord)
    {
        adapayRecord.setUpdateTime(DateUtils.getNowDate());
        return adapayRecordMapper.updateAdapayRecord(adapayRecord);
    }

    /**
     * 批量删除汇付支付支付记录
     *
     * @param ids 需要删除的汇付支付支付记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayRecordByIds(Long[] ids)
    {
        return adapayRecordMapper.deleteAdapayRecordByIds(ids);
    }


    /**
     * 批量逻辑删除汇付支付支付记录
     *
     * @param ids 需要删除的汇付支付支付记录主键
     * @return 结果
     */
    @Override
    public int logicDeleteAdapayRecord(Long[] ids,String delType,Long delUser)
    {
        return adapayRecordMapper.logicDeleteAdapayRecord(ids,delType,delUser);
    }

    /**
     * 删除汇付支付支付记录信息
     *
     * @param id 汇付支付支付记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayRecordById(Long id)
    {
        return adapayRecordMapper.deleteAdapayRecordById(id);
    }
}
